package demo.ssm.test;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import demo.ssm.dao.mapper.SysuserMapper;
import demo.ssm.pojo.po.Sysuser;

public class testbase {
	
	SysuserMapper SysuserMapper;
	ApplicationContext ac = new ClassPathXmlApplicationContext(new String[] {
			"applicationContext.xml", "applicationContext-base-dao.xml"

	});
	
	@Test
	//根据主键查询用户信息
	public void testSelectByPrimaryKey() {
		SysuserMapper = (SysuserMapper) ac.getBean("SysuserMapper");
		//System.out.println(userMapper);
		Sysuser user =  SysuserMapper.selectByPrimaryKey("1");
		System.out.println(user);
	}
	
}
